package com.example.arithmeticleetcode.leetcode.dec;

/**
 * @program: arithmetic-leetcode
 * @description:
 * @author: FangZhen
 * @create: 2020-12-07 09:35
 **/
public class Demo01 {

    public static void main(String[] args) {
        new Demo01().removePalindromeSub("baabb");
    }

    public int removePalindromeSub(String s) {
        if (s.length() == 0) return 0;
        int headCount = 0;
        int tailHead = s.length();

        while (headCount <= tailHead) {
            String substring = s.substring(headCount, tailHead);
            StringBuilder sb = new StringBuilder(substring);
            boolean headFlag = sb.reverse().toString().equals(substring);

            substring = s.substring(headCount, --tailHead);

//            count++;
//            if () {
//                break;
//            }

        }
        return headCount;
    }
}
